package com.kefu.sys.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Transient;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

@Data
@TableName(value="sys_user")
@ApiModel(description="用户")
public class SysUser implements Serializable {
    /**
     * 主键
     */
    
    @TableId(value="user_id")
    @NotEmpty
    @ApiModelProperty(name = "userId", value = "主键")
    private String userId;

    /**
     * 租户
     */
    @TableField(value = "tenant_id")
    @ApiModelProperty(name = "tenantId", value = "租户")
    private String tenantId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(name = "createTime", value = "创建时间")
    private Long createTime;

    /**
     * 创建人
     */
    @TableField(value = "create_user")
    @ApiModelProperty(name = "createUser", value = "创建人")
    private String createUser;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(name = "updateTime", value = "修改时间")
    private Long updateTime;

    /**
     * 修改人
     */
    @TableField(value = "update_user")
    @ApiModelProperty(name = "updateUser", value = "修改人")
    private String updateUser;

    /**
     * 登录时间
     */
    @TableField(value = "login_time")
    @ApiModelProperty(name = "loginTime", value = "登录时间")
    private Long loginTime;

    /**
     * 邮箱
     */
    @TableField(value = "user_email")
    @ApiModelProperty(name = "userEmail", value = "邮箱")
    private String userEmail;

    /**
     * 姓名
     */
    @TableField(value = "user_name")
    @ApiModelProperty(name = "userName", value = "姓名")
    private String userName;

    /**
     * 电话
     */
    @TableField(value = "user_phone")
    @ApiModelProperty(name = "userPhone", value = "电话")
    private String userPhone;

    /**
     * 状态：0停用，1启用
     */
    @TableField(value = "user_status")
    @ApiModelProperty(name = "userStatus", value = "状态：0停用，1启用")
    private Integer userStatus;

    /**
     * 组织
     */
    @TableField(value = "organ_id")
    @ApiModelProperty(name = "organId", value = "组织")
    private String organId;

    /**
     * 头像
     */
    @TableField(value = "user_face")
    @ApiModelProperty(name = "userFace", value = "头像")
    private String userFace;

    /**
     * 密码
     */
    @TableField(value = "user_pwd")
    @ApiModelProperty(name = "userPwd", value = "密码")
    @JsonIgnore
    private String userPwd;

    /**
     * 工号
     */
    @TableField(value = "user_jobno")
    @ApiModelProperty(name = "userJobno", value = "工号")
    private String userJobno;

    /**
     * 昵称
     */
    @TableField(value = "user_nick")
    @ApiModelProperty(name = "userNick", value = "昵称")
    private String userNick;

    /**
     * 岗位：0客服，1管理员，超管
     */
    @TableField(value = "user_post")
    @ApiModelProperty(name = "userPost", value = "岗位：0客服，1管理员，2超管")
    private Integer userPost;

    /**
     * 最大接待上线
     */
    @TableField(value = "max_accept")
    @ApiModelProperty(name = "maxAccept", value = "最大接待上线")
    private Integer maxAccept;

    @ApiModelProperty(value = "组织名字")
    @Transient
    @TableField(exist=false)
    private String organName;

    @TableField(exist=false)
    @ApiModelProperty(value = "技能组名称")
    private String groupName;

    @ApiModelProperty(value = "语言，zh-cn，en-us")
    private String language;

    @TableField(value = "call_timeout")
    @ApiModelProperty( value = "超时不请求被下线时间， -1表示不会超时，秒")
    private Integer callTimeout;

    @TableField(value = "did_number")
    @ApiModelProperty( value = "外显号码")
    private String didNumber;

    @TableField(value = "sip_number")
    @ApiModelProperty( value = "话机号码")
    private String sipNumber;

    @TableField(value = "expire_time")
    @ApiModelProperty(value = "客服到期时间")
    private Long expireTime;

    private static final long serialVersionUID = 1L;
}